// Raf Lempens & Bjorn Schobben
#include "Spinner.h"
#include "ActivateAbility.h"

Spinner::Spinner(unsigned int initialCellX, unsigned int initialCellY): GameObject(initialCellX, initialCellY), activateAbility(0)
{
	// Setup abilities
	activateAbility = new ActivateAbility(this);


	AddAbility(activateAbility);

	// Setup behaviour
	spinBehavior.SetActivator(this);
}

Spinner::~Spinner()
{
	if (activateAbility)
	{
		delete activateAbility;
		activateAbility = 0;
	}
}

void Spinner::SetDirection(const Direction& direction)
{
	spinDirection = direction;
	spinBehavior.SetTurnDirection(direction);
}

void Spinner::Activate()
{
	printf("Spinner activated\n");
}

GameBehavior* Spinner::GetBehavior()
{
	return &spinBehavior;
}
